package com.food.platformmsgmanagement.domain;

/**
 * 值对象
 * @author 24270
 */
public class CommentText {
    private String text;

    public CommentText() {}

    public CommentText(String text) {
        this.text = text;
    }

    private void text(String text) {
        if (text.length() < 2) {
            throw new CommentException("评论字数不能少于2");
        }
    }

    public String value() {
        return this.text;
    }
}
